package cn.edu.scau.cmi.front.domain;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import cn.edu.scau.cmi.ema.domain.Address;
public class FuzzyAddress implements Comparable<FuzzyAddress>{
	
	private String name;//需要模糊匹配的地址名称
	private int rowNumber;//电子表格中的行的编号
	
	private boolean isAddress;//是地址还是公司名称，默认是地址
	private Set<String> segments = new HashSet<String>();//地址名称分词后的列表
	/*
	 * 利用本地匹配的地址，可能有偏差，需要核实
	 */
	private Set<Address> localMatchAddresses = new HashSet<Address>();
	/* 选中的本机选中的匹配地址 */
	private Address selectedLocalMatchAddress = new Address();
	
	/*
	 * 利用百度匹配的地址，待完成
	 */
	private Set<Address> baiduMatchAddresses = new HashSet<Address>();
	private Address selectedBaiduMatchAddress = new Address();
	
	/*
	 * 利用天眼查匹配的地址，待完成
	 */
	private Set<Address> tycMatchAddresses = new HashSet<Address>();
	private Address selectTycMatchAddress = new Address();
	
	
	
	
	private int matchQuantity;
	private Address address;

	public int getMatchQuantity() {
		return matchQuantity;
	}

	public void setMatchQuantity(int matchQuantity) {
		this.matchQuantity = matchQuantity;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}
	
	@Override
	public int compareTo(FuzzyAddress o) {
		// 通常情况下是从小到大排序，但是本处需要从大到小排序
		return o.getMatchQuantity() - this.getMatchQuantity() ;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean getIsAddress() {
		return isAddress;
	}

	public void setIsAddress(boolean isAddress) {
		this.isAddress = isAddress;
	}

	public Set<String> getSegments() {
		return segments;
	}

	public void setSegments(Set<String> segments) {
		this.segments = segments;
	}

	public Set<Address> getLocalMatchAddresses() {
		return localMatchAddresses;
	}

	public void setLocalMatchAddresses(Set<Address> localMatchAddresses) {
		this.localMatchAddresses = localMatchAddresses;
	}

	public Set<Address> getBaiduMatchAddresses() {
		return baiduMatchAddresses;
	}

	public void setBaiduMatchAddresses(Set<Address> baiduMatchAddresses) {
		this.baiduMatchAddresses = baiduMatchAddresses;
	}

	public Set<Address> getTycMatchAddresses() {
		return tycMatchAddresses;
	}

	public void setTycMatchAddresses(Set<Address> tycMatchAddresses) {
		this.tycMatchAddresses = tycMatchAddresses;
	}



	public Address getSelectedLocalMatchAddress() {
		return selectedLocalMatchAddress;
	}

	public void setSelectedLocalMatchAddress(Address selectedLocalMatchAddress) {
		this.selectedLocalMatchAddress = selectedLocalMatchAddress;
	}

	public Address getSelectedBaiduMatchAddress() {
		return selectedBaiduMatchAddress;
	}

	public void setSelectedBaiduMatchAddress(Address selectedBaiduMatchAddress) {
		this.selectedBaiduMatchAddress = selectedBaiduMatchAddress;
	}

	public Address getSelectTycMatchAddress() {
		return selectTycMatchAddress;
	}

	public void setSelectTycMatchAddress(Address selectTycMatchAddress) {
		this.selectTycMatchAddress = selectTycMatchAddress;
	}

	public int getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(int rowNumber) {
		this.rowNumber = rowNumber;
	}


}